package com.cloud.log.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoggerTestController {

    Logger logger = LoggerFactory.getLogger(LoggerTestController.class);

    @GetMapping("/test")
    public String test() {
        logger.info("test logger....");
        return "hello";
    }


    @GetMapping("/hello")
    public String hello() {
        for (int i = 0; i < 100000; i++) {
            logger.info("info execute index method");
            logger.warn("warn execute index method");
            logger.error("error execute index method");
        }
        return "My First SpringBoot Application";
    }
}
